<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QxOrm: C:/Dvlp/_Perso/QxOrm/include/QxDao/QxDao.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_qxorm.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QxOrm
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">C++ Object Relational Mapping library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_qx_dao_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">QxDao.h</div>  </div>
</div>
<div class="contents">
<a href="_qx_dao_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/****************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">**</span>
<a name="l00003"></a>00003 <span class="comment">** http://www.qxorm.com/</span>
<a name="l00004"></a>00004 <span class="comment">** Copyright (C) 2013 Lionel Marty (contact@qxorm.com)</span>
<a name="l00005"></a>00005 <span class="comment">**</span>
<a name="l00006"></a>00006 <span class="comment">** This file is part of the QxOrm library</span>
<a name="l00007"></a>00007 <span class="comment">**</span>
<a name="l00008"></a>00008 <span class="comment">** This software is provided &#39;as-is&#39;, without any express or implied</span>
<a name="l00009"></a>00009 <span class="comment">** warranty. In no event will the authors be held liable for any</span>
<a name="l00010"></a>00010 <span class="comment">** damages arising from the use of this software</span>
<a name="l00011"></a>00011 <span class="comment">**</span>
<a name="l00012"></a>00012 <span class="comment">** Commercial Usage</span>
<a name="l00013"></a>00013 <span class="comment">** Licensees holding valid commercial QxOrm licenses may use this file in</span>
<a name="l00014"></a>00014 <span class="comment">** accordance with the commercial license agreement provided with the</span>
<a name="l00015"></a>00015 <span class="comment">** Software or, alternatively, in accordance with the terms contained in</span>
<a name="l00016"></a>00016 <span class="comment">** a written agreement between you and Lionel Marty</span>
<a name="l00017"></a>00017 <span class="comment">**</span>
<a name="l00018"></a>00018 <span class="comment">** GNU General Public License Usage</span>
<a name="l00019"></a>00019 <span class="comment">** Alternatively, this file may be used under the terms of the GNU</span>
<a name="l00020"></a>00020 <span class="comment">** General Public License version 3.0 as published by the Free Software</span>
<a name="l00021"></a>00021 <span class="comment">** Foundation and appearing in the file &#39;license.gpl3.txt&#39; included in the</span>
<a name="l00022"></a>00022 <span class="comment">** packaging of this file. Please review the following information to</span>
<a name="l00023"></a>00023 <span class="comment">** ensure the GNU General Public License version 3.0 requirements will be</span>
<a name="l00024"></a>00024 <span class="comment">** met : http://www.gnu.org/copyleft/gpl.html</span>
<a name="l00025"></a>00025 <span class="comment">**</span>
<a name="l00026"></a>00026 <span class="comment">** If you are unsure which license is appropriate for your use, or</span>
<a name="l00027"></a>00027 <span class="comment">** if you have questions regarding the use of this file, please contact :</span>
<a name="l00028"></a>00028 <span class="comment">** contact@qxorm.com</span>
<a name="l00029"></a>00029 <span class="comment">**</span>
<a name="l00030"></a>00030 <span class="comment">****************************************************************************/</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef _QX_DAO_H_</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define _QX_DAO_H_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#pragma once</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;QtSql/qsqldatabase.h&gt;</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include &lt;QtSql/qsqlquery.h&gt;</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;QtSql/qsqlrecord.h&gt;</span>
<a name="l00049"></a>00049 <span class="preprocessor">#include &lt;QtSql/qsqlfield.h&gt;</span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;QtSql/qsqlerror.h&gt;</span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &lt;QtSql/qsqldriver.h&gt;</span>
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;<a class="code" href="_qx_bool_8h.html" title="qx_bool : QxOrm library boolean type with code and description message when an error occured...">QxCommon/QxBool.h</a>&gt;</span>
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="preprocessor">#include &lt;<a class="code" href="_qx_soft_delete_8h.html" title="Soft delete (or logical delete) behavior to update a row into database (flag it as deleted) instead o...">QxDao/QxSoftDelete.h</a>&gt;</span>
<a name="l00056"></a>00056 <span class="preprocessor">#include &lt;<a class="code" href="_qx_dao_pointer_8h.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">QxDao/QxDaoPointer.h</a>&gt;</span>
<a name="l00057"></a>00057 <span class="preprocessor">#include &lt;<a class="code" href="_qx_sql_query_8h.html" title="Define a user SQL query added to default SQL query builded by QxOrm library, and used by qx::dao::xxx...">QxDao/QxSqlQuery.h</a>&gt;</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include &lt;<a class="code" href="_qx_sql_save_mode_8h.html" title="To improve performance, if you know that you are just inserting or updating items in database...">QxDao/QxSqlSaveMode.h</a>&gt;</span>
<a name="l00059"></a>00059 
<a name="l00060"></a>00060 <span class="keyword">namespace </span>qx {
<a name="l00061"></a>00061 <span class="keyword">class </span>QxSqlRelationParams;
<a name="l00062"></a>00062 <span class="keyword">namespace </span>dao {
<a name="l00063"></a>00063 
<a name="l00064"></a>00064 <span class="keyword">namespace </span>detail {
<a name="l00065"></a>00065 <span class="keyword">class </span>IxDao_Helper;
<a name="l00066"></a>00066 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Count;
<a name="l00067"></a>00067 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_FetchById;
<a name="l00068"></a>00068 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_FetchById_WithRelation;
<a name="l00069"></a>00069 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_FetchAll;
<a name="l00070"></a>00070 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_FetchAll_WithRelation;
<a name="l00071"></a>00071 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Insert;
<a name="l00072"></a>00072 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Insert_WithRelation;
<a name="l00073"></a>00073 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Update;
<a name="l00074"></a>00074 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Update_Optimized;
<a name="l00075"></a>00075 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Update_WithRelation;
<a name="l00076"></a>00076 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Save;
<a name="l00077"></a>00077 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Save_WithRelation;
<a name="l00078"></a>00078 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Save_WithRelation_Recursive;
<a name="l00079"></a>00079 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_DeleteById;
<a name="l00080"></a>00080 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_DeleteAll;
<a name="l00081"></a>00081 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Exist;
<a name="l00082"></a>00082 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_CreateTable;
<a name="l00083"></a>00083 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_Trigger;
<a name="l00084"></a>00084 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">struct </span>QxDao_ExecuteQuery;
<a name="l00085"></a>00085 } <span class="comment">// namespace detail</span>
<a name="l00086"></a>00086 
<a name="l00096"></a>00096 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00097"></a><a class="code" href="group___qx_dao.html#gaf777ce33c67ea7fcd4e60b740d15f9ec">00097</a> <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="group___qx_dao.html#gaf777ce33c67ea7fcd4e60b740d15f9ec" title="Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm c...">count</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query = <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>(), QSqlDatabase * pDatabase = NULL)
<a name="l00098"></a>00098 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#gaf777ce33c67ea7fcd4e60b740d15f9ec" title="Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm c...">qx::dao::detail::QxDao_Count&lt;T&gt;::count</a>(query, pDatabase); }
<a name="l00099"></a>00099 
<a name="l00110"></a>00110 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00111"></a><a class="code" href="group___qx_dao.html#ga092ef20c723a13b6250ed27153162665">00111</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gaf777ce33c67ea7fcd4e60b740d15f9ec" title="Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm c...">count</a>(<span class="keywordtype">long</span> &amp; lCount, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query = <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a>(), QSqlDatabase * pDatabase = NULL)
<a name="l00112"></a>00112 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#gaf777ce33c67ea7fcd4e60b740d15f9ec" title="Return the number of lines in the table (database) mapped to the C++ class T (registered into QxOrm c...">qx::dao::detail::QxDao_Count&lt;T&gt;::count</a>(lCount, query, pDatabase); }
<a name="l00113"></a>00113 
<a name="l00124"></a>00124 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00125"></a><a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995">00125</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995" title="Insert an element or a list of elements into database.">insert</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00126"></a>00126 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995" title="Insert an element or a list of elements into database.">qx::dao::detail::QxDao_Insert&lt;T&gt;::insert</a>(t, pDatabase); }
<a name="l00127"></a>00127 
<a name="l00140"></a>00140 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00141"></a><a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b">00141</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">save</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00142"></a>00142 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">qx::dao::detail::QxDao_Save&lt;T&gt;::save</a>(t, pDatabase); }
<a name="l00143"></a>00143 
<a name="l00157"></a>00157 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00158"></a><a class="code" href="group___qx_dao.html#ga298e15a5e745ae43d99de9b4279aca3e">00158</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga298e15a5e745ae43d99de9b4279aca3e" title="Delete a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered i...">delete_by_id</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00159"></a>00159 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_DeleteById&lt;T&gt;::deleteById(t, pDatabase, <span class="keyword">true</span>); }
<a name="l00160"></a>00160 
<a name="l00171"></a>00171 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00172"></a><a class="code" href="group___qx_dao.html#ga776e2edd2da36029cddc13e9e6e366f5">00172</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga776e2edd2da36029cddc13e9e6e366f5" title="Destroy a line (or list of lines) of a table (database) mapped to a C++ object of type T (registered ...">destroy_by_id</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00173"></a>00173 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_DeleteById&lt;T&gt;::deleteById(t, pDatabase, <span class="keyword">false</span>); }
<a name="l00174"></a>00174 
<a name="l00187"></a>00187 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00188"></a><a class="code" href="group___qx_dao.html#ga959410c3e4bcc075a7c5f9c5d41bb734">00188</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga959410c3e4bcc075a7c5f9c5d41bb734" title="Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context)...">delete_all</a>(QSqlDatabase * pDatabase = NULL)
<a name="l00189"></a>00189 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_DeleteAll&lt;T&gt;::deleteAll(<span class="stringliteral">&quot;&quot;</span>, pDatabase, <span class="keyword">true</span>); }
<a name="l00190"></a>00190 
<a name="l00200"></a>00200 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00201"></a><a class="code" href="group___qx_dao.html#ga075cc9ac81c4cf65fb67d3d286a1de76">00201</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga075cc9ac81c4cf65fb67d3d286a1de76" title="Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context)...">destroy_all</a>(QSqlDatabase * pDatabase = NULL)
<a name="l00202"></a>00202 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_DeleteAll&lt;T&gt;::deleteAll(<span class="stringliteral">&quot;&quot;</span>, pDatabase, <span class="keyword">false</span>); }
<a name="l00203"></a>00203 
<a name="l00217"></a>00217 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00218"></a><a class="code" href="group___qx_dao.html#gac9f35c808cdff54ecd0c06784fffccdf">00218</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gac9f35c808cdff54ecd0c06784fffccdf" title="Delete all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and fi...">delete_by_query</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL)
<a name="l00219"></a>00219 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_DeleteAll&lt;T&gt;::deleteAll(query, pDatabase, <span class="keyword">true</span>); }
<a name="l00220"></a>00220 
<a name="l00231"></a>00231 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00232"></a><a class="code" href="group___qx_dao.html#ga859152daecd5f06d8ca7442dc4b719a3">00232</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga859152daecd5f06d8ca7442dc4b719a3" title="Destroy all lines of a table (database) mapped to a C++ class T (registered into QxOrm context) and f...">destroy_by_query</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, QSqlDatabase * pDatabase = NULL)
<a name="l00233"></a>00233 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_DeleteAll&lt;T&gt;::deleteAll(query, pDatabase, <span class="keyword">false</span>); }
<a name="l00234"></a>00234 
<a name="l00244"></a>00244 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00245"></a><a class="code" href="group___qx_dao.html#gacdaac47549d0e850cf5d6a16315efaab">00245</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gacdaac47549d0e850cf5d6a16315efaab" title="Create a table into database (with all columns) mapped to a C++ class T (registered into QxOrm contex...">create_table</a>(QSqlDatabase * pDatabase = NULL)
<a name="l00246"></a>00246 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_CreateTable&lt;T&gt;::createTable(pDatabase); }
<a name="l00247"></a>00247 
<a name="l00258"></a>00258 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00259"></a><a class="code" href="group___qx_dao.html#ga3f941d4bf676e2762891a18f595fb4d4">00259</a> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="group___qx_dao.html#ga3f941d4bf676e2762891a18f595fb4d4" title="Search if an element (or list of elements) already exists into database.">exist</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00260"></a>00260 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga3f941d4bf676e2762891a18f595fb4d4" title="Search if an element (or list of elements) already exists into database.">qx::dao::detail::QxDao_Exist&lt;T&gt;::exist</a>(t, pDatabase); }
<a name="l00261"></a>00261 
<a name="l00273"></a>00273 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00274"></a><a class="code" href="group___qx_dao.html#ga37648a23475371e1b83ea2082265790d">00274</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga37648a23475371e1b83ea2082265790d" title="Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a...">fetch_by_id_with_relation</a>(<span class="keyword">const</span> QString &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00275"></a>00275 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchById_WithRelation&lt;T&gt;::fetchById(relation, t, pDatabase); }
<a name="l00276"></a>00276 
<a name="l00288"></a>00288 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00289"></a><a class="code" href="group___qx_dao.html#ga93ccebffc7a816c4bc566ed0fc8e2403">00289</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga37648a23475371e1b83ea2082265790d" title="Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a...">fetch_by_id_with_relation</a>(<span class="keyword">const</span> QStringList &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00290"></a>00290 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchById_WithRelation&lt;T&gt;::fetchById(relation, t, pDatabase); }
<a name="l00291"></a>00291 
<a name="l00302"></a>00302 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00303"></a><a class="code" href="group___qx_dao.html#gafae6ca489fa472c6b664721845948aec">00303</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gafae6ca489fa472c6b664721845948aec" title="Fetch an object t (retrieve all its properties and relationships) of type T (registered into QxOrm co...">fetch_by_id_with_all_relation</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00304"></a>00304 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchById_WithRelation&lt;T&gt;::fetchById(<span class="stringliteral">&quot;*&quot;</span>, t, pDatabase); }
<a name="l00305"></a>00305 
<a name="l00317"></a>00317 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00318"></a><a class="code" href="group___qx_dao.html#gad4e90031bacdd06cf278ae3ccefa9811">00318</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gad4e90031bacdd06cf278ae3ccefa9811" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">fetch_all_with_relation</a>(<span class="keyword">const</span> QString &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00319"></a>00319 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchAll_WithRelation&lt;T&gt;::fetchAll(relation, <span class="stringliteral">&quot;&quot;</span>, t, pDatabase); }
<a name="l00320"></a>00320 
<a name="l00332"></a>00332 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00333"></a><a class="code" href="group___qx_dao.html#ga31d712c392496d5e185e2f9036254789">00333</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gad4e90031bacdd06cf278ae3ccefa9811" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">fetch_all_with_relation</a>(<span class="keyword">const</span> QStringList &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00334"></a>00334 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchAll_WithRelation&lt;T&gt;::fetchAll(relation, <span class="stringliteral">&quot;&quot;</span>, t, pDatabase); }
<a name="l00335"></a>00335 
<a name="l00346"></a>00346 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00347"></a><a class="code" href="group___qx_dao.html#gafde0aa42be925bc394520674bbe03c01">00347</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gafde0aa42be925bc394520674bbe03c01" title="Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type...">fetch_all_with_all_relation</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00348"></a>00348 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchAll_WithRelation&lt;T&gt;::fetchAll(<span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;&quot;</span>, t, pDatabase); }
<a name="l00349"></a>00349 
<a name="l00362"></a>00362 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00363"></a><a class="code" href="group___qx_dao.html#ga2d8f0176ef1c7b675297637090c95129">00363</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga2d8f0176ef1c7b675297637090c95129" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">fetch_by_query_with_relation</a>(<span class="keyword">const</span> QString &amp; relation, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00364"></a>00364 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchAll_WithRelation&lt;T&gt;::fetchAll(relation, query, t, pDatabase); }
<a name="l00365"></a>00365 
<a name="l00378"></a>00378 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00379"></a><a class="code" href="group___qx_dao.html#gae49d4201f0a06aac254dc07b282d0c45">00379</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga2d8f0176ef1c7b675297637090c95129" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">fetch_by_query_with_relation</a>(<span class="keyword">const</span> QStringList &amp; relation, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00380"></a>00380 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchAll_WithRelation&lt;T&gt;::fetchAll(relation, query, t, pDatabase); }
<a name="l00381"></a>00381 
<a name="l00393"></a>00393 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00394"></a><a class="code" href="group___qx_dao.html#gac9baf82921316cf054abb9126df5a81c">00394</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gac9baf82921316cf054abb9126df5a81c" title="Fetch a list of objects (retrieve all elements and properties + all relationships associated) of type...">fetch_by_query_with_all_relation</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00395"></a>00395 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchAll_WithRelation&lt;T&gt;::fetchAll(<span class="stringliteral">&quot;*&quot;</span>, query, t, pDatabase); }
<a name="l00396"></a>00396 
<a name="l00408"></a>00408 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00409"></a><a class="code" href="group___qx_dao.html#ga82e03bc10e1fbdc3f58f1efac252f4bc">00409</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga82e03bc10e1fbdc3f58f1efac252f4bc" title="Insert an element and its relationships (or a list of elements + relationships) into database...">insert_with_relation</a>(<span class="keyword">const</span> QString &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00410"></a>00410 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995" title="Insert an element or a list of elements into database.">qx::dao::detail::QxDao_Insert_WithRelation&lt;T&gt;::insert</a>(relation, t, pDatabase); }
<a name="l00411"></a>00411 
<a name="l00423"></a>00423 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00424"></a><a class="code" href="group___qx_dao.html#ga3631a4b5832cae2a7a684b5ecb0d75df">00424</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga82e03bc10e1fbdc3f58f1efac252f4bc" title="Insert an element and its relationships (or a list of elements + relationships) into database...">insert_with_relation</a>(<span class="keyword">const</span> QStringList &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00425"></a>00425 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995" title="Insert an element or a list of elements into database.">qx::dao::detail::QxDao_Insert_WithRelation&lt;T&gt;::insert</a>(relation, t, pDatabase); }
<a name="l00426"></a>00426 
<a name="l00437"></a>00437 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00438"></a><a class="code" href="group___qx_dao.html#ga5b15d51effdce39c2db51af2a3d6ee6c">00438</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga5b15d51effdce39c2db51af2a3d6ee6c" title="Insert an element and all its relationships (or a list of elements + all relationships) into database...">insert_with_all_relation</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00439"></a>00439 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#gab4400decee849f008633c52a47508995" title="Insert an element or a list of elements into database.">qx::dao::detail::QxDao_Insert_WithRelation&lt;T&gt;::insert</a>(<span class="stringliteral">&quot;*&quot;</span>, t, pDatabase); }
<a name="l00440"></a>00440 
<a name="l00452"></a>00452 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00453"></a><a class="code" href="group___qx_dao.html#ga1ef8fc06625b53a5dd44aa629df0ec09">00453</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga1ef8fc06625b53a5dd44aa629df0ec09" title="Update an element and its relationships (or a list of elements + relationships) into database...">update_with_relation</a>(<span class="keyword">const</span> QString &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00454"></a>00454 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::detail::QxDao_Update_WithRelation&lt;T&gt;::update</a>(relation, <span class="stringliteral">&quot;&quot;</span>, t, pDatabase); }
<a name="l00455"></a>00455 
<a name="l00468"></a>00468 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00469"></a><a class="code" href="group___qx_dao.html#ga9fb34aec7e865b97365c91ba20e422d2">00469</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga9fb34aec7e865b97365c91ba20e422d2" title="Update an element and its relationships (or a list of elements + relationships) into database (adding...">update_by_query_with_relation</a>(<span class="keyword">const</span> QString &amp; relation, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00470"></a>00470 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::detail::QxDao_Update_WithRelation&lt;T&gt;::update</a>(relation, query, t, pDatabase); }
<a name="l00471"></a>00471 
<a name="l00483"></a>00483 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00484"></a><a class="code" href="group___qx_dao.html#gaeb797148a635ed73ccc7b07e0441781c">00484</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga1ef8fc06625b53a5dd44aa629df0ec09" title="Update an element and its relationships (or a list of elements + relationships) into database...">update_with_relation</a>(<span class="keyword">const</span> QStringList &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00485"></a>00485 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::detail::QxDao_Update_WithRelation&lt;T&gt;::update</a>(relation, <span class="stringliteral">&quot;&quot;</span>, t, pDatabase); }
<a name="l00486"></a>00486 
<a name="l00499"></a>00499 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00500"></a><a class="code" href="group___qx_dao.html#gada891d9a5014953f85246082464ea885">00500</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga9fb34aec7e865b97365c91ba20e422d2" title="Update an element and its relationships (or a list of elements + relationships) into database (adding...">update_by_query_with_relation</a>(<span class="keyword">const</span> QStringList &amp; relation, <span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00501"></a>00501 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::detail::QxDao_Update_WithRelation&lt;T&gt;::update</a>(relation, query, t, pDatabase); }
<a name="l00502"></a>00502 
<a name="l00513"></a>00513 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00514"></a><a class="code" href="group___qx_dao.html#ga0dceedd8eb471369d44baa3081b6e255">00514</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga0dceedd8eb471369d44baa3081b6e255" title="Update an element and all its relationships (or a list of elements + all relationships) into database...">update_with_all_relation</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00515"></a>00515 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::detail::QxDao_Update_WithRelation&lt;T&gt;::update</a>(<span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;&quot;</span>, t, pDatabase); }
<a name="l00516"></a>00516 
<a name="l00528"></a>00528 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00529"></a><a class="code" href="group___qx_dao.html#ga201b1897089841edc197fa2b86cf65b6">00529</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga201b1897089841edc197fa2b86cf65b6" title="Update an element and all its relationships (or a list of elements + all relationships) into database...">update_by_query_with_all_relation</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00530"></a>00530 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::detail::QxDao_Update_WithRelation&lt;T&gt;::update</a>(<span class="stringliteral">&quot;*&quot;</span>, query, t, pDatabase); }
<a name="l00531"></a>00531 
<a name="l00545"></a>00545 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00546"></a><a class="code" href="group___qx_dao.html#ga653fbb3a886e48bca4236ea3fe6ac865">00546</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga653fbb3a886e48bca4236ea3fe6ac865" title="Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elem...">save_with_relation</a>(<span class="keyword">const</span> QString &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00547"></a>00547 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">qx::dao::detail::QxDao_Save_WithRelation&lt;T&gt;::save</a>(relation, t, pDatabase); }
<a name="l00548"></a>00548 
<a name="l00562"></a>00562 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00563"></a><a class="code" href="group___qx_dao.html#ga8e6cc3903f37563aa3db0cec36babfcd">00563</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga653fbb3a886e48bca4236ea3fe6ac865" title="Insert (if no exist) or update (if already exist) an element and its relationships (or a list of elem...">save_with_relation</a>(<span class="keyword">const</span> QStringList &amp; relation, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00564"></a>00564 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">qx::dao::detail::QxDao_Save_WithRelation&lt;T&gt;::save</a>(relation, t, pDatabase); }
<a name="l00565"></a>00565 
<a name="l00578"></a>00578 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00579"></a><a class="code" href="group___qx_dao.html#ga8d08cafb739abd81f727ed64060cd577">00579</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga8d08cafb739abd81f727ed64060cd577" title="Insert (if no exist) or update (if already exist) an element and all its relationships (or a list of ...">save_with_all_relation</a>(T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00580"></a>00580 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">qx::dao::detail::QxDao_Save_WithRelation&lt;T&gt;::save</a>(<span class="stringliteral">&quot;*&quot;</span>, t, pDatabase); }
<a name="l00581"></a>00581 
<a name="l00601"></a>00601 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00602"></a><a class="code" href="group___qx_dao.html#gadf265ab7dd42ab831dbb94bf5aeeafd3">00602</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gadf265ab7dd42ab831dbb94bf5aeeafd3" title="Insert (if no exist) or update (if already exist) recursively an element and all levels of relationsh...">save_with_relation_recursive</a>(T &amp; t, <a class="code" href="structqx_1_1dao_1_1save__mode.html#a597b360b936ecba23b0137b14940897c">qx::dao::save_mode::e_save_mode</a> eSaveMode = <a class="code" href="structqx_1_1dao_1_1save__mode.html#a597b360b936ecba23b0137b14940897ca5a854540ed438d33cb50160f25c7ac2b">qx::dao::save_mode::e_check_insert_or_update</a>, QSqlDatabase * pDatabase = NULL, <a class="code" href="classqx_1_1_qx_sql_relation_params.html" title="qx::QxSqlRelationParams : define list of parameters to transfer to relationships to manage SQL querie...">qx::QxSqlRelationParams</a> * pRelationParams = NULL)
<a name="l00603"></a>00603 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">qx::dao::detail::QxDao_Save_WithRelation_Recursive&lt;T&gt;::save</a>(t, eSaveMode, pDatabase, pRelationParams); }
<a name="l00604"></a>00604 
<a name="l00616"></a>00616 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00617"></a><a class="code" href="group___qx_dao.html#ga2abaf5f2e6de160b099cf2ab74967244">00617</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga2abaf5f2e6de160b099cf2ab74967244" title="Fetch an object t (retrieve all its properties) of type T (registered into QxOrm context) mapped to a...">fetch_by_id</a>(T &amp; t, QSqlDatabase * pDatabase = NULL, <span class="keyword">const</span> QStringList &amp; columns = QStringList())
<a name="l00618"></a>00618 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchById&lt;T&gt;::fetchById(t, pDatabase, columns); }
<a name="l00619"></a>00619 
<a name="l00631"></a>00631 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00632"></a><a class="code" href="group___qx_dao.html#gab7a00918917a06ad703a8d6887b94edb">00632</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gab7a00918917a06ad703a8d6887b94edb" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">fetch_all</a>(T &amp; t, QSqlDatabase * pDatabase = NULL, <span class="keyword">const</span> QStringList &amp; columns = QStringList())
<a name="l00633"></a>00633 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchAll&lt;T&gt;::fetchAll(<span class="stringliteral">&quot;&quot;</span>, t, pDatabase, columns); }
<a name="l00634"></a>00634 
<a name="l00647"></a>00647 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00648"></a><a class="code" href="group___qx_dao.html#ga98785915863d9487b0f3734b667a3c72">00648</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga98785915863d9487b0f3734b667a3c72" title="Fetch a list of objects (retrieve all elements and properties associated) of type T (container regist...">fetch_by_query</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL, <span class="keyword">const</span> QStringList &amp; columns = QStringList())
<a name="l00649"></a>00649 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_FetchAll&lt;T&gt;::fetchAll(query, t, pDatabase, columns); }
<a name="l00650"></a>00650 
<a name="l00662"></a>00662 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00663"></a><a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2">00663</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">update</a>(T &amp; t, QSqlDatabase * pDatabase = NULL, <span class="keyword">const</span> QStringList &amp; columns = QStringList())
<a name="l00664"></a>00664 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::detail::QxDao_Update&lt;T&gt;::update</a>(<span class="stringliteral">&quot;&quot;</span>, t, pDatabase, columns); }
<a name="l00665"></a>00665 
<a name="l00678"></a>00678 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00679"></a><a class="code" href="group___qx_dao.html#ga1bd1d32eccfb73ccd6a0e82130061fb4">00679</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga1bd1d32eccfb73ccd6a0e82130061fb4" title="Update an element or a list of elements into database (adding a user SQL query to the default SQL que...">update_by_query</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL, <span class="keyword">const</span> QStringList &amp; columns = QStringList())
<a name="l00680"></a>00680 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga690042401fc276a1929d311759b69ce2" title="Update an element or a list of elements into database.">qx::dao::detail::QxDao_Update&lt;T&gt;::update</a>(query, t, pDatabase, columns); }
<a name="l00681"></a>00681 
<a name="l00692"></a>00692 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00693"></a><a class="code" href="group___qx_dao.html#ga3419d221eac86764eb328da5a89f7fc9">00693</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga3419d221eac86764eb328da5a89f7fc9" title="Update only modified fields/properties of an element or a list of elements into database (using is di...">update_optimized</a>(<a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>, QSqlDatabase * pDatabase = NULL)
<a name="l00694"></a>00694 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga3419d221eac86764eb328da5a89f7fc9" title="Update only modified fields/properties of an element or a list of elements into database (using is di...">qx::dao::detail::QxDao_Update_Optimized&lt;T&gt;::update_optimized</a>(<span class="stringliteral">&quot;&quot;</span>, ptr, pDatabase); }
<a name="l00695"></a>00695 
<a name="l00707"></a>00707 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00708"></a><a class="code" href="group___qx_dao.html#gaf6b0075263b6f7f17de4ef5b58336620">00708</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#gaf6b0075263b6f7f17de4ef5b58336620" title="Update only modified fields/properties of an element or a list of elements into database (using is di...">update_optimized_by_query</a>(<span class="keyword">const</span> <a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">qx::dao::ptr&lt;T&gt;</a> &amp; <a class="code" href="classqx_1_1dao_1_1ptr.html" title="qx::dao::ptr&lt;T&gt; : provide a classic smart-pointer (like boost::shared_ptr&lt;T&gt; or QSharedPointer&lt;T&gt;) wi...">ptr</a>, QSqlDatabase * pDatabase = NULL)
<a name="l00709"></a>00709 { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga3419d221eac86764eb328da5a89f7fc9" title="Update only modified fields/properties of an element or a list of elements into database (using is di...">qx::dao::detail::QxDao_Update_Optimized&lt;T&gt;::update_optimized</a>(query, ptr, pDatabase); }
<a name="l00710"></a>00710 
<a name="l00719"></a>00719 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00720"></a><a class="code" href="group___qx_dao.html#ga095032025fbf7aee88da96479203a077">00720</a> <span class="keyword">inline</span> QSqlError <a class="code" href="group___qx_dao.html#ga095032025fbf7aee88da96479203a077" title="Execute a custom SQL query or a stored procedure, all columns that can be mapped to the instance of t...">execute_query</a>(<a class="code" href="classqx_1_1_qx_sql_query.html" title="qx::QxSqlQuery : define a user SQL query added to default SQL query builded by QxOrm library...">qx::QxSqlQuery</a> &amp; query, T &amp; t, QSqlDatabase * pDatabase = NULL)
<a name="l00721"></a>00721 { <span class="keywordflow">return</span> qx::dao::detail::QxDao_ExecuteQuery&lt;T&gt;::executeQuery(query, t, pDatabase); }
<a name="l00722"></a>00722 
<a name="l00727"></a>00727 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00728"></a><a class="code" href="group___qx_dao.html#gaed00d55c48be46437cd62bfea8f32aa5">00728</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group___qx_dao.html#gaed00d55c48be46437cd62bfea8f32aa5" title="Callback before inserting an object into database (here is an example using QxOrm Trigger)...">on_before_insert</a>(T * t, <a class="code" href="classqx_1_1dao_1_1detail_1_1_ix_dao___helper.html" title="qx::dao::detail::IxDao_Helper : helper class to communicate with database">qx::dao::detail::IxDao_Helper</a> * dao)
<a name="l00729"></a>00729 { qx::dao::detail::QxDao_Trigger&lt;T&gt;::onBeforeInsert(t, dao); }
<a name="l00730"></a>00730 
<a name="l00735"></a>00735 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00736"></a><a class="code" href="group___qx_dao.html#gaaaa2e9e04f61c53c6d0874930e36200c">00736</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group___qx_dao.html#gaaaa2e9e04f61c53c6d0874930e36200c" title="Callback before updating an object into database (here is an example using QxOrm Trigger)">on_before_update</a>(T * t, <a class="code" href="classqx_1_1dao_1_1detail_1_1_ix_dao___helper.html" title="qx::dao::detail::IxDao_Helper : helper class to communicate with database">qx::dao::detail::IxDao_Helper</a> * dao)
<a name="l00737"></a>00737 { qx::dao::detail::QxDao_Trigger&lt;T&gt;::onBeforeUpdate(t, dao); }
<a name="l00738"></a>00738 
<a name="l00743"></a>00743 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00744"></a><a class="code" href="group___qx_dao.html#ga63dccf427753e3721e98a33b54d45e04">00744</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group___qx_dao.html#ga63dccf427753e3721e98a33b54d45e04" title="Callback before deleting an object into database (here is an example using QxOrm Trigger)">on_before_delete</a>(T * t, <a class="code" href="classqx_1_1dao_1_1detail_1_1_ix_dao___helper.html" title="qx::dao::detail::IxDao_Helper : helper class to communicate with database">qx::dao::detail::IxDao_Helper</a> * dao)
<a name="l00745"></a>00745 { qx::dao::detail::QxDao_Trigger&lt;T&gt;::onBeforeDelete(t, dao); }
<a name="l00746"></a>00746 
<a name="l00751"></a>00751 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00752"></a><a class="code" href="group___qx_dao.html#ga8a7b2264975a9bbb1066e1e7fd04950b">00752</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group___qx_dao.html#ga8a7b2264975a9bbb1066e1e7fd04950b" title="Callback before fetching an object from database (here is an example using QxOrm Trigger)">on_before_fetch</a>(T * t, <a class="code" href="classqx_1_1dao_1_1detail_1_1_ix_dao___helper.html" title="qx::dao::detail::IxDao_Helper : helper class to communicate with database">qx::dao::detail::IxDao_Helper</a> * dao)
<a name="l00753"></a>00753 { qx::dao::detail::QxDao_Trigger&lt;T&gt;::onBeforeFetch(t, dao); }
<a name="l00754"></a>00754 
<a name="l00759"></a>00759 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00760"></a><a class="code" href="group___qx_dao.html#gacaaa084f1ea02d01068ebf2511a31269">00760</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group___qx_dao.html#gacaaa084f1ea02d01068ebf2511a31269" title="Callback after inserting an object into database (here is an example using QxOrm Trigger)">on_after_insert</a>(T * t, <a class="code" href="classqx_1_1dao_1_1detail_1_1_ix_dao___helper.html" title="qx::dao::detail::IxDao_Helper : helper class to communicate with database">qx::dao::detail::IxDao_Helper</a> * dao)
<a name="l00761"></a>00761 { qx::dao::detail::QxDao_Trigger&lt;T&gt;::onAfterInsert(t, dao); }
<a name="l00762"></a>00762 
<a name="l00767"></a>00767 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00768"></a><a class="code" href="group___qx_dao.html#ga38b67d04705e32fa84e3616e2c5473b2">00768</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group___qx_dao.html#ga38b67d04705e32fa84e3616e2c5473b2" title="Callback after updating an object into database (here is an example using QxOrm Trigger)">on_after_update</a>(T * t, <a class="code" href="classqx_1_1dao_1_1detail_1_1_ix_dao___helper.html" title="qx::dao::detail::IxDao_Helper : helper class to communicate with database">qx::dao::detail::IxDao_Helper</a> * dao)
<a name="l00769"></a>00769 { qx::dao::detail::QxDao_Trigger&lt;T&gt;::onAfterUpdate(t, dao); }
<a name="l00770"></a>00770 
<a name="l00775"></a>00775 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00776"></a><a class="code" href="group___qx_dao.html#ga5e6316a02de905e470a8a2d4826a5638">00776</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group___qx_dao.html#ga5e6316a02de905e470a8a2d4826a5638" title="Callback after deleting an object into database (here is an example using QxOrm trigger)">on_after_delete</a>(T * t, <a class="code" href="classqx_1_1dao_1_1detail_1_1_ix_dao___helper.html" title="qx::dao::detail::IxDao_Helper : helper class to communicate with database">qx::dao::detail::IxDao_Helper</a> * dao)
<a name="l00777"></a>00777 { qx::dao::detail::QxDao_Trigger&lt;T&gt;::onAfterDelete(t, dao); }
<a name="l00778"></a>00778 
<a name="l00783"></a>00783 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
<a name="l00784"></a><a class="code" href="group___qx_dao.html#gabcd80dc690fadb52e684046cfc37912d">00784</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group___qx_dao.html#gabcd80dc690fadb52e684046cfc37912d" title="Callback after fetching an object from database (here is an example using QxOrm trigger)">on_after_fetch</a>(T * t, <a class="code" href="classqx_1_1dao_1_1detail_1_1_ix_dao___helper.html" title="qx::dao::detail::IxDao_Helper : helper class to communicate with database">qx::dao::detail::IxDao_Helper</a> * dao)
<a name="l00785"></a>00785 { qx::dao::detail::QxDao_Trigger&lt;T&gt;::onAfterFetch(t, dao); }
<a name="l00786"></a>00786 
<a name="l00787"></a>00787 } <span class="comment">// namespace dao</span>
<a name="l00788"></a>00788 } <span class="comment">// namespace qx</span>
<a name="l00789"></a>00789 
<a name="l00790"></a>00790 <span class="preprocessor">#endif // _QX_DAO_H_</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_qx_dao_8h.html">QxDao.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Dec 11 2016 13:41:03 for QxOrm by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
